﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using dotUML.Core.Common;

namespace dotUML.Core.Parser
{
    /// <summary>
    /// IXmlParser is the top-level interface for parsing xml diagram descriptions.
    /// </summary>
    public interface IXmlParser
    {
        /// <summary>
        /// List of parsing errors.
        /// </summary>
        List<IError> Errors
        {
            get;
            set;
        }

        /// <summary>
        /// Parse an xml-file and create a dotUML model based on the file's content.
        /// </summary>
        /// <param name="Xml">Xml diagram description.</param>
        /// <param name="Model">dotUML model.</param>
        /// <returns>True if parsing is succsessful, otherwise false.</returns>
        bool Parse(string Xml, IModel Model);

        /// <summary>
        /// Validate an xml-file against an xml-schema.
        /// </summary>
        /// <param name="Xml">String representation of an xml-file.</param>
        /// <returns>True if the file is valid, otherwise - false.</returns>
        bool ValidateXml(string Xml);
    }
}
